/**
 * 
 */
package com.whf15.o2o.dto;

/** 
* @author 作者 :whfo 
* @version 创建时间：2021年6月29日 下午4:07:11 
* 类说明 封装json对象，所有返回结果都使用它
*/
public class Result<T> {
	private boolean success;//是否成功标记
	private T data;//成功时返回的数据
	private String errorMsg;//错误信息
	private int erroerCode;
	
	public Result() {
	}
	
	//成功时的构造器
	public Result(boolean success, T data) {
		super();
		this.success = success;
		this.data = data;
	}
	
	//错误时的构造器
	public Result(boolean success, String errorMsg, int erroerCode) {
		super();
		this.success = success;
		this.errorMsg = errorMsg;
		this.erroerCode = erroerCode;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public int getErroerCode() {
		return erroerCode;
	}

	public void setErroerCode(int erroerCode) {
		this.erroerCode = erroerCode;
	}
	
	
	
	
}
